package com.cloud.demo.models.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cloud.demo.models.sys.domain.SysDept;
import com.cloud.demo.models.sys.mapper.SysDeptMapper;
import com.cloud.demo.models.sys.qo.SysDeptQuery;
import com.cloud.demo.models.sys.service.SysDeptService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
* 部门服务接口实现
*/
@Service
@Transactional
public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> implements SysDeptService {
    @Resource
    private SysDeptMapper sysDeptMapper;

    @Override
    public IPage<SysDept> queryPage(SysDeptQuery qo) {
        IPage<SysDept> page = new Page<>(qo.getCurrentPage(), qo.getLimit());
        QueryWrapper<SysDept> wrapper = Wrappers.<SysDept>query();
        return super.page(page, wrapper);
    }


}
